// 
const {DataTypes, db } = require("../db");
db.define('vInvoiceInfo', {
id: {type: DataTypes.INTEGER, primaryKey: true, autoIncrement: true,comment:'表自增ID'},
tenantId:{type: DataTypes.INTEGER,comment:''}, 
iid:{type: DataTypes.INTEGER,allowNull:false,comment:''}, 
locationId:{type: DataTypes.SMALLINT,allowNull:false,comment:''}, 
locationName:{type: DataTypes.STRING(100),allowNull:false,comment:''}, 
billNo:{type: DataTypes.STRING(50),allowNull:false,comment:''}, 
trans:{type: DataTypes.STRING(50),comment:''}, 
invId:{type: DataTypes.INTEGER,allowNull:false,comment:''}, 
invName:{type: DataTypes.STRING(255),allowNull:false,comment:''}, 
spec:{type: DataTypes.INTEGER,allowNull:false,comment:''}, 
calNum:{type: DataTypes.INTEGER,allowNull:false,comment:''}, 
unit:{type: DataTypes.STRING(50),allowNull:false,comment:''}, 
qty:{type: DataTypes.DECIMAL(20, 2),allowNull:false,comment:''}, 
assQty:{type: DataTypes.STRING(100),comment:''}, 
price:{type: DataTypes.DECIMAL(20, 8),comment:''}, 
deduction:{type: DataTypes.DECIMAL(18, 2),comment:''}, 
amount:{type: DataTypes.DECIMAL(18, 2),comment:''}, 
send:{type: DataTypes.STRING(50),comment:''}, 
sendId:{type: DataTypes.INTEGER,comment:''}, 
isYs:{type: DataTypes.INTEGER,comment:''}, 
ysId:{type: DataTypes.INTEGER,comment:''}, 
srcOrderNo:{type: DataTypes.STRING(100),comment:''}, 
remark:{type: DataTypes.STRING(1000),comment:''}, 
ysIid:{type: DataTypes.INTEGER,comment:''}, 
totalAmount:{type: DataTypes.DECIMAL(18, 2),comment:''}, 
ysAmount:{type: DataTypes.DECIMAL(18, 2),comment:''}, 
amountReal:{type: DataTypes.DECIMAL(18, 2),comment:''}, 
hxAmount:{type: DataTypes.DECIMAL(19, 2),comment:''}, 
sendChild:{type: DataTypes.TEXT,comment:''}, 
serialNo:{type: DataTypes.STRING(200),comment:''}, 
qtyReal:{type: DataTypes.DECIMAL(20, 2),comment:''}, 
transType:{type: DataTypes.INTEGER,comment:''}, 
buId:{type: DataTypes.INTEGER,comment:''}, 
transTypeName:{type: DataTypes.STRING(255),comment:''}, 
billType:{type: DataTypes.STRING(255),comment:''}, 
oldId:{type: DataTypes.INTEGER,comment:''}, 
sendMainUuid:{type: DataTypes.STRING(64),comment:''}, 
sendSubUuid:{type: DataTypes.STRING(64),comment:''}, 
billState:{type: DataTypes.STRING(50),comment:''}, 
barCode1:{type: DataTypes.STRING(60),comment:''}, 

}, {
    tableName: 'v_invoice_info',
    timestamps: false,
    comment: '',
    
});